<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>定制生产派工单</title>
    <!-- Google Font: Source Sans Pro -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="../dist/css/adminlte.min.css">
    <!-- overlayScrollbars -->
    <link rel="stylesheet" href="../plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
</head>
<body onload="queryMPS()">
    <link rel="stylesheet"  href="../css/bootstrap.min.css">
    <link rel="stylesheet"  href="../css/bootstrap-table.min.css">
    <script src="../js/jquery.min.js" ></script>
    <script src="../js/bootstrap.bundle.min.js" ></script>
    <script src="../js/bootstrap.min.js"  ></script>
    <script src="../js/bootstrap-table.min.js"  ></script>
    <script src="../js/bootstrap-table-zh-CN.min.js"></script>
    <script src="../js/index.js"></script>
    <table id="mytable">
        <tr>
            <th>计划单编号</th>
            <th>产品编号</th>
            <th>产品名</th>
            <th>描述</th>
            <th>数量</th>
            <th>审核时间</th>
        </tr>
    </table>
    <a onclick="generateadispatchorder()">查看</a>
    <div class="modal" tabindex="-1" role="dialog" id="exampleModal">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Modal title</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col">
                            工单定制人：<input id="designer" class="form-control">
                        </div>
                        <div class="col">
                            登记人：<input id="register" class="form-control">
                        </div>
                    </div>
                    <div class="row">
                        <div class="col">
                            产品编号：<input id="productId" class="form-control">
                        </div>
                        <div class="col">
                            产品名：<input id="productName" class="form-control">
                        </div>
                    </div>
                    <div class="row">
                        <div class="col">
                            产品数量：<input id="amount" class="form-control">
                        </div>
                        <div class="col">
                            描述：<input id="productDescribe" class="form-control">
                            <input id="id" type="hidden">
                        </div>
                    </div>
                    <button class="btn btn-outline-success" onclick="update()">定制生产派工单</button>
                    <button class="btn btn-outline-dark" onclick="ck()">取消</button>
                </div>
                <div class="modal-footer">

                </div>
            </div>
        </div>
    </div>
    <script>
        function ck() {
            $("#exampleModal").modal("hide")
        }
        function update() {
            var s = JSON.stringify($("#designer").val())
            localStorage.setItem("designer", s);
            var s1 = JSON.stringify($("#register").val())
            localStorage.setItem("register", s1);
            var s2 = JSON.stringify($("#productId").val())
            localStorage.setItem("productId", s2);
            var s3 = JSON.stringify($("#productName").val())
            localStorage.setItem("productName", s3);
            var s4 = JSON.stringify($("#amount").val())
            localStorage.setItem("amount", s4);
            var s5 = JSON.stringify($("#productDescribe").val())
            localStorage.setItem("productDescribe", s5);
            var s6 = JSON.stringify($("#id").val())
            localStorage.setItem("id", s6);
            location.href="query.html"
        }
    </script>
</body>
</html>